<ui:composition template="../index/index.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">

	<ui:define name="content">
		<p:fieldset legend="Tabela de Preços">
			<p:dataTable var="itemTabela" value="#{tabelaBean.itens}"
				paginator="true" rows="8">

				<p:column sortBy="#{itemTabela.procedimento.nome}"
					headerText="Prodedimento">
					<h:outputText value="#{itemTabela.procedimento.nome}" />
				</p:column>


				<p:columns headerText="#{coluna.planoSaude.nome}"
					value="#{tabelaBean.colunas}" var="coluna"
					columnIndexVar="colIndex">

					<h:form id="formValor">
						<h:commandLink styleClass="celulaStyle"
							action="#{tabelaBean.editValor}">
							<h:outputLabel value="#{itemTabela.valores[colIndex].valorMoeda}" />
							<f:param name="colIndex" value="#{colIndex}" />
							<f:setPropertyActionListener target="#{tabelaBean.itemTabela}"
								value="#{itemTabela}" />
						</h:commandLink>
					</h:form>

				</p:columns>

			</p:dataTable>
		</p:fieldset>
	</ui:define>
</ui:composition>